from demo_python_pkg.person_node import PersonNode
import rclpy

class WriterNode(PersonNode):
    def __init__(self, node_name:str, name:str, age:int, book:str) -> None:
        print(f"WriterNode.__init__ 被调用了")
        super().__init__(node_name, name, age)
        self.book = book

def main():
    rclpy.init()
    node1 = WriterNode("writer","lilee",18,"ros 从入门到放弃")
    node1.eat("orange")
    rclpy.spin(node1)
    rclpy.shutdown()